/**
 * Created by zhulijun on 2017/4/18.
 */
export const releaseTime = [{
    value: '',
    label: '广告发布时间'
}, {
    value: 'TODAY',
    label: '今天'
}, {
    value: 'YESTERDAY',
    label: '昨天'
}, {
    value: 'LAST_7_DAYS',
    label: '近7天'
}, {
    value: 'LAST_14_DAYS',
    label: '近14天'
}, {
    value: 'LAST_30_DAYS',
    label: '近30天'
}, {
    value: 'OPTION6',
    label: '自定义时间'
}];

export const releaseTime1 = [{
    value: 'TODAY',
    label: '今天'
}, {
    value: 'YESTERDAY',
    label: '昨天'
}, {
    value: '',
    label: '近7天'
}, {
    value: 'LAST_14_DAYS',
    label: '近14天'
}, {
    value: 'LAST_30_DAYS',
    label: '近30天'
}, {
    value: 'OPTION6',
    label: '自定义时间'
}];

export const releaseAim = [{
    value: '',
    label: '广告目标'
}, {
    value: 'LINK_CLICKS',
    label: '访问量'
}, {
    value: 'BRAND_AWARENESS',
    label: '品牌知名度'
}, {
    value: 'PAGE_LIKES',
    label: '主页点赞'
}];


export const deliveryStatus1 = [{ //广告系列
    value: '',
    label: '投放状态'
}, {
    value: 'SERVING',
    label: '有效'
}, {
    value: 'SUSPENDED',
    label: '已暂停'
}, {
    value: 'PENDING',
    label: '无法运行'
}, {
    value: 'DELETED',
    label: '已删除'
}, {
    value: 'SCHEDULE_COMPLETE',
    label: '已结束'
}];

export const deliveryStatus2 = [{ //广告组
    value: '',
    label: '投放状态'
}, {
    value: 'ACTIVE',
    label: '有效'
}, {
    value: 'PAUSED',
    label: '无法运行'
}, {
    value: 'DELETED',
    label: '已删除'
}, {
    value: 'SCHEDULE_COMPLETE',
    label: '已结束'
}];

export const deliveryStatus3 = [{ //关键词
    value: '',
    label: '投放状态'
}, {
    value: 'APPROVED',
    label: '有效'
}, {
    value: 'PENDING_REVIEW',
    label: '待审查'
}, {
    value: 'UNDER_REVIEW',
    label: '审查中'
}, {
    value: 'DISAPPROVED',
    label: '无法运行'
}, {
    value: 'DELETED',
    label: '已删除'
}];

export const deliveryStatus4 = [{ //附加信息
    value: '',
    label: '投放状态'
}, {
    value: 'APPROVED',
    label: '已批准'
}, {
    value: 'UNCHECKED',
    label: '待审核'
}, {
    value: 'DISAPPROVED',
    label: '已拒登'
}, {
    value: 'REMOVED',
    label: '已删除'
}];


export const deliveryStatus5 = [{ //广告
    value: '',
    label: '投放状态'
}, {
    value: 'UNKNOWN',
    label: '未知'
}, {
    value: 'APPROVED',
    label: '批准'
}, {
    value: 'APPROVED_LIMIT',
    label: '批准（受限）'
}, {
    value: 'ELIGIBLE',
    label: '有效'
}, {
    value: 'UNDER_REVIEW',
    label: '审核中'
}, {
    value: 'DISAPPROVED',
    label: '已拒登'
}, {
    value: 'SUSPENDED',
    label: '已暂停'
}, {
    value: 'DELETED',
    label: '已删除'
}, {
    value: 'SCHEDULE_COMPLETE',
    label: '已结束'
}];


export const releaseType = [{
    value: '',
    label: '全部类型'
}, {
    value: '0',
    label: '搜索网络和精选展示广告网络'
}, {
    value: '1',
    label: '仅限搜索网络'
}, {
    value: '2',
    label: '仅限精选展示广告网络'
}];

export const releaseAddition = [{
    value: '',
    label: '全部附加信息'
}, {
    value: 'SITELINK',
    label: '附加链接'
}, {
    value: 'CALL',
    label: '附加电话'
}, {
    value: 'CALLOUT',
    label: '附加宣传信息'
}];


export const releaseStatus = [{
    value: '',
    label: '投放状态'
}, {
    value: 'ARCHIVED',
    label: '草稿'
}, {
    value: 'PENDING_REVIEW',
    label: '待审核'
}, {
    value: 'DISAPPROVED',
    label: '未通过'
}, {
    value: 'ACTIVE',
    label: '投放中'
}, {
    value: 'UNDELIVERY',
    label: '未投放'
}, {
    value: 'PAUSED',
    label: '已暂停'
}, {
    value: 'PENDING_BILLING_INFO',
    label: '已完成'
}, {
    value: 'DELETED',
    label: '已删除'
}];

export const releaseStatus1 = [{
    value: '',
    label: '投放状态'
}, {
    value: 'ARCHIVED',
    label: '草稿'
}, {
    value: 'PENDING_REVIEW',
    label: '待审核'
}, {
    value: 'DISAPPROVED',
    label: '未通过'
}, {
    value: 'ACTIVE',
    label: '投放中'
}, {
    value: 'PENDING_DELIVERY',
    label: '已排期'
} , {
    value: 'UNDELIVERY',
    label: '未投放'
}, {
    value: 'PAUSED',
    label: '已暂停'
}, {
    value: 'PENDING_BILLING_INFO',
    label: '已完成'
}, {
    value: 'DELETED',
    label: '已删除'
}];

export const releaseSegment = [{
    value: '',
    label: '细分受众统计'
}, {
    value: 'AGE',
    label: '年龄'
}, {
    value: 'GENDER',
    label: '性别'
}, {
    value: 'COUNTRY',
    label: '地区'
}, {
    value: 'IMPRESSION_DEVICE',
    label: '展示设备'
}];

export const releaseSegment1 = [{
    value: '',
    label: '细分受众统计'
}, {
    value: 'PLACEMENT',
    label: '位置'
}, {
    value: 'IMPRESSION_DEVICE',
    label: '展示设备'
}];

export const getStatusName = (status) => {
    switch (status) {
    case 'ACTIVE':
        return '投放中';
        break;
    case 'PAUSED':
        return '已暂停 ';
        break;
    case 'PENDING_REVIEW':
        return '待审核';
        break;
    case 'DISAPPROVED':
        return '未通过';
        break;
    case 'PREAPPROVED':
        return '已排期';
        break;
    case 'PENDING_BILLING_INFO':
        return '未投放';
        break;
    case 'ARCHIVED':
        return '草稿';
        break;
    case 'CAMPAIGN_PAUSED':
        return '广告系列已暂停';
        break;
    case 'ADSET_PAUSED':
        return '广告组已暂停';
        break;
    case 'SERVING':
        return '有效';
        break;
    case 'PENDING':
        return '无法运行';
        break;
    case 'SUSPENDED':
        return '已暂停';
        break;
    case 'NOCHECK':
        return '未审核';
        break;
    case 'DELETED':
        return '已删除';
        break;
    }
};

export const getStatusName1 = (status) => { //GOOGLE关键词
    switch (status) {
        case 'APPROVED':
            return '有效';
            break;
        case 'PENDING_REVIEW':
            return '待审查';
            break;
        case 'UNDER_REVIEW':
            return '审查中';
            break;
        case 'DISAPPROVED':
            return '无法运行';
            break;
        case 'SUSPENDED':
            return '无法运行';
            break;
        case 'SERIES_PAUSED':
            return '广告系列暂停';
            break;
        case 'GROUP_PAUSED':
            return '广告组暂停';
            break;
        case 'UNDELIVERY':
            return '未投放';
            break;
        case 'SCHEDULE_COMPLETE':
            return '排期结束';
            break;
        case 'DELETED':
            return '已删除';
            break;
    }
};

export const getStatusName2 = (status) => {    //GOOGLE广告系列
    switch (status) {
        case 'SERVING':
            return '有效';
            break;
        case 'PENDING':
            return '无法运行';
            break;
        case 'SUSPENDED':
            return '已暂停';
            break;
        case 'SERIES_PAUSED':
            return '广告系列暂停';
            break;
        case 'GROUP_PAUSED':
            return '广告组暂停';
            break;
        case 'UNDELIVERY':
            return '未投放';
            break;
        case 'SCHEDULE_COMPLETE':
            return '排期结束';
            break;
        case 'DELETED':
            return '已删除';
            break;
    }
};


export const getStatusName4= (status) => {    //GOOGLE广告系列
    switch (status) {
        case 'ACTIVE':
            return '有效';
            break;
        case 'PAUSED':
            return '无法运行';
            break;
        case 'SERIES_PAUSED':
            return '广告系列暂停';
            break;
        case 'GROUP_PAUSED':
            return '广告组暂停';
            break;
        case 'UNDELIVERY':
            return '未投放';
            break;
        case 'SCHEDULE_COMPLETE':
            return '排期结束';
            break;
        case 'DELETED':
            return '已删除';
            break;
    }
};

export const getStatusName3 = (status) => {   //GOOGLE广告
    switch (status) {
        case 'SERIES_PAUSED':
            return '广告系列暂停';
            break;
        case 'GROUP_PAUSED':
            return '广告组暂停';
            break;
        case 'UNDELIVERY':
            return '未投放';
            break;
        case 'SCHEDULE_COMPLETE':
            return '排期结束';
            break;
        case 'DELETED':
            return '已删除';
            break;
        case 'APPROVED':
            return '批准';
            break;
        case 'APPROVED_LIMIT':
            return '批准（受限）';
            break;
        case 'ELIGIBLE':
            return '合适';
            break;
        case 'UNDER_REVIEW':
            return '审核';
            break;
        case 'DISAPPROVED':
            return '无法运行';
            break;
        case 'SUSPENDED':
            return '已暂停';
            break;
    }
};

export const getStatus = (status) => {
    if (status == 'ACTIVE') {
        return true;
    } else {
        return false;
    }
};

export const switchStatus = (status, type) => {
    if (status) {
        if (type == 1) {
            return '投放中';
        } else {
            return 'ACTIVE';
        }
    } else {
        if (type == 1) {
            return '已暂停';
        } else {
            return 'PAUSED';
        }
    }
};

export const getAimName = (aim) => {
    switch (aim) {
    case 'LINK_CLICKS':
        return '访问量';
        break;
    case 'BRAND_AWARENESS':
        return '品牌知名度 ';
        break;
    case 'PAGE_LIKES':
        return '主页点赞';
        break;
    case '合计':
        return '合计';
        break;
    }
};


export const getMatchTypeName = (name) => {
    switch (name) {
    case 'EXACT':
        return '完全匹配';
        break;
    case 'PHRASE':
        return '词组匹配 ';
        break;
    case 'BROAD':
        return '广泛匹配';
    }
};

export const getConnectType = (type) => {
    switch (type) {
    case 'CONNECTION':
        return '主页点赞';
        break;
    case 'FRIEND':
        return '主页点赞好友 ';
        break;
    case 'EXCLUDE':
        return '排除主页点赞';
        break;
    }
};

export const getCompetitionType = (type) => {
    switch (type) {
    case 'HIGH':
        return '高';
        break;
    case 'MIDEL':
        return '中';
        break;
    case 'LOW':
        return '低';
        break;
    }
};

export const getTypeClass = (type) => {
    switch (type) {
    case '1':
        return 'icon-widely-match tip-wrapper1';
        break;
    case '2':
        return 'icon-complete-match tip-wrapper1';
        break;
    case '3':
        return 'icon-phrase-match tip-wrapper2';
        break;
    }
};

export const getTypeName = (type) => {
    switch (type) {
        case 'CALL':
            return '编辑电话号码';
            break;
        case 'SITELINK':
            return '附加链接';
            break;
        case 'CALLOUT':
            return '编辑宣传信息';
            break;
    }
};